package com.ly.heart.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.ly.common.utils.DateUtils;
import com.ly.heart.mapper.KingFinanceReceiptBillReciteMapper;
import com.ly.heart.service.IKingFinanceReceiptBillReciteService;
import org.springframework.stereotype.Service;
import com.ly.heart.domain.KingFinanceReceiptBillReciteEntity;

import javax.annotation.Resource;

/**
 * 金蝶-财务-应收票据背书明细Service业务层处理
 *
 * @author wutao
 * @date 2024-06-24
 */
@Service
public class KingFinanceReceiptBillReciteServiceImpl extends ServiceImpl<KingFinanceReceiptBillReciteMapper, KingFinanceReceiptBillReciteEntity> implements IKingFinanceReceiptBillReciteService {

    @Resource
    private KingFinanceReceiptBillReciteMapper kingFinanceReceiptBillReciteEntityMapper;

    /**
     * 查询金蝶-财务-应收票据背书明细
     *
     * @param id 金蝶-财务-应收票据背书明细ID
     * @return 金蝶-财务-应收票据背书明细
     */
    @Override
    public KingFinanceReceiptBillReciteEntity selectKingFinanceReceiptBillReciteEntityById ( String id ) {
        return kingFinanceReceiptBillReciteEntityMapper.selectKingFinanceReceiptBillReciteEntityById ( id );
    }

    /**
     * 查询金蝶-财务-应收票据背书明细列表
     *
     * @param kingFinanceReceiptBillReciteEntity 金蝶-财务-应收票据背书明细
     * @return 金蝶-财务-应收票据背书明细
     */
    @Override
    public List<KingFinanceReceiptBillReciteEntity> selectKingFinanceReceiptBillReciteEntityList ( KingFinanceReceiptBillReciteEntity kingFinanceReceiptBillReciteEntity ) {
        return kingFinanceReceiptBillReciteEntityMapper.selectKingFinanceReceiptBillReciteEntityList ( kingFinanceReceiptBillReciteEntity );
    }

    /**
     * 新增金蝶-财务-应收票据背书明细
     *
     * @param kingFinanceReceiptBillReciteEntity 金蝶-财务-应收票据背书明细
     * @return 结果
     */
    @Override
    public int insertKingFinanceReceiptBillReciteEntity ( KingFinanceReceiptBillReciteEntity kingFinanceReceiptBillReciteEntity ) {
        kingFinanceReceiptBillReciteEntity.setCreateTime ( DateUtils.getNowDate () );
        return kingFinanceReceiptBillReciteEntityMapper.insertKingFinanceReceiptBillReciteEntity ( kingFinanceReceiptBillReciteEntity );
    }

    /**
     * 修改金蝶-财务-应收票据背书明细
     *
     * @param kingFinanceReceiptBillReciteEntity 金蝶-财务-应收票据背书明细
     * @return 结果
     */
    @Override
    public int updateKingFinanceReceiptBillReciteEntity ( KingFinanceReceiptBillReciteEntity kingFinanceReceiptBillReciteEntity ) {
        kingFinanceReceiptBillReciteEntity.setUpdateTime ( DateUtils.getNowDate () );
        return kingFinanceReceiptBillReciteEntityMapper.updateKingFinanceReceiptBillReciteEntity ( kingFinanceReceiptBillReciteEntity );
    }

    /**
     * 批量删除金蝶-财务-应收票据背书明细
     *
     * @param ids 需要删除的金蝶-财务-应收票据背书明细ID
     * @return 结果
     */
    @Override
    public int deleteKingFinanceReceiptBillReciteEntityByIds ( String[] ids ) {
        return kingFinanceReceiptBillReciteEntityMapper.deleteKingFinanceReceiptBillReciteEntityByIds ( ids );
    }

    /**
     * 删除金蝶-财务-应收票据背书明细信息
     *
     * @param id 金蝶-财务-应收票据背书明细ID
     * @return 结果
     */
    @Override
    public int deleteKingFinanceReceiptBillReciteEntityById ( String id ) {
        return kingFinanceReceiptBillReciteEntityMapper.deleteKingFinanceReceiptBillReciteEntityById ( id );
    }
}
